package com.example.demo2.student;


import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * <p>
 * 
 * </p>
 * @author rzw
 * @date 2023/12/14
 * @Version: 1.0
 *
 */
@WebServlet("/FindAllKechnegName")
public class FindAllKechnegName extends HttpServlet {
	private static final long serialVersionUID = 1L;

	public FindAllKechnegName() {
		super();

	}

	
	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		request.setCharacterEncoding("UTF-8");
		response.setCharacterEncoding("UTF-8");
		KechengDaoImp daoImo = new KechengDaoImp();
		request.setAttribute("list", daoImo.selectAll());
		request.setAttribute("list", daoImo.selectAll());
		request.getRequestDispatcher("/studentChengjiList.jsp").forward(request, response);
	}


	
	protected void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		request.setCharacterEncoding("UTF-8");
		response.setCharacterEncoding("UTF-8");
		KechengDaoImp daoImo = new KechengDaoImp();
		request.setAttribute("list", daoImo.selectAll());
		request.getRequestDispatcher("/studentChengjiList.jsp").forward(request, response);
	}

}
